<template>
	<view class="statistics">
		<view class="top">
			<view class="numbox">
				<text class="num">{{info.total}}</text>
				<text class="tips">YSB总量池</text>
			</view>
		</view>
		<view class="numList">
			<view class="list_item">
				<text class="item_num">{{info.release}}</text>
				<text class="item_tips">YSB释放池</text>
			</view>
			<view class="list_item">
				<text class="item_num">{{info.surplus}}</text>
				<text class="item_tips">YSB剩余释放池</text>
			</view>
			<view class="list_item">
				<text class="item_num">{{info.burn}}</text>
				<text class="item_tips">YSB总燃烧池</text>
			</view>
			<view class="list_item">
				<text class="item_num">{{info.today_burn}}</text>
				<text class="item_tips">YSB总燃烧池今日</text>
			</view>
			<view class="list_item">
				<text class="item_num">{{info.pool}}</text>
				<text class="item_tips">共识池</text>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		DataStatic
	} from "@/api/user.js"
	export default {
		data() {
			return {
				info: []
			}
		},
		onLoad() {
			this.DataStatic()
		},
		methods: {
			DataStatic() {
				DataStatic().then(res => {
					console.log(res);
					this.info = res.data
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background: #efefef;
	}

	.numList {
		background: #fff;
		margin: 0 auto;
		border-radius: 8px;
		padding: 10px;
		margin-top: -50px;
		width: 94%;
		box-sizing: border-box;
		display: table;
		box-shadow: 0 0 5px #efefef;

		.list_item {
			width: 50%;
			box-sizing: border-box;
			float: left;
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			margin: 10px 0;

			.item_num {
				font-weight: bold;
			}

			.item_tips {
				font-size: 13px;
				color: #999;
				margin-top: 8px;
			}
		}

	}

	.top {
		height: 220px;
		display: flex;
		align-items: center;
		justify-content: center;
		color: #fff;
		background: linear-gradient(to right, #FD5656, #EA7575);

		.numbox {
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;

			.num {
				font-weight: bold;
				font-size: 20px;
			}

			.tips {
				font-size: 14px;
			}
		}
	}
</style>